/**
* \file __CDAORechercheLier.h
* \author Corentin Le Bail
* \date 2009-2012
* \brief Fichier de déclaration de la class CDAORechercheLier
*/
//------------------------------------------------------------------------------
#ifndef __CDAORECHERCHELIER_H__
#define __CDAORECHERCHELIER_H__
//------------------------------------------------------------------------------
#include "CDAO.h"
//------------------------------------------------------------------------------
/**
* \class CDAORechercheLier __CDAORechercheLier.h "__CDAORechercheLier.h"
* \brief Classe : .
*/
class CDAORechercheLier : public CDAO {
	private:
		QVariant _id;
		QVariant _tableSource;
		QVariant _champSource;
		QVariant _tableDest;
		QVariant _champDest;
	public:
		/**
		 * \fn  QString getTableName(void)
		 * \return La nom de la table de la base de données
		 */
		QString getTableName(void) { return "rechercheLier"; }
		/**
		 * \fn QVariant getFieldId(void) 
		 * \return Identifiant
		 */
		QVariant getFieldId(void) { return _id; }; 
		/**
		 * \fn QVariant void setFieldId(QVariant id) 
		 * \brief affecte Identifiant
		 */
		void setFieldId(QVariant id) { _id=id; }; 
		/**
		 * \fn QVariant getFieldTableSource(void) 
		 * \return Table source
		 */
		QVariant getFieldTableSource(void) { return _tableSource; }; 
		/**
		 * \fn QVariant void setFieldTableSource(QVariant tableSource) 
		 * \brief affecte Table source
		 */
		void setFieldTableSource(QVariant tableSource) { _tableSource=tableSource; }; 
		/**
		 * \fn QVariant getFieldChampSource(void) 
		 * \return Champ source
		 */
		QVariant getFieldChampSource(void) { return _champSource; }; 
		/**
		 * \fn QVariant void setFieldChampSource(QVariant champSource) 
		 * \brief affecte Champ source
		 */
		void setFieldChampSource(QVariant champSource) { _champSource=champSource; }; 
		/**
		 * \fn QVariant getFieldTableDest(void) 
		 * \return Table destination
		 */
		QVariant getFieldTableDest(void) { return _tableDest; }; 
		/**
		 * \fn QVariant void setFieldTableDest(QVariant tableDest) 
		 * \brief affecte Table destination
		 */
		void setFieldTableDest(QVariant tableDest) { _tableDest=tableDest; }; 
		/**
		 * \fn QVariant getFieldChampDest(void) 
		 * \return Champ destination
		 */
		QVariant getFieldChampDest(void) { return _champDest; }; 
		/**
		 * \fn QVariant void setFieldChampDest(QVariant champDest) 
		 * \brief affecte Champ destination
		 */
		void setFieldChampDest(QVariant champDest) { _champDest=champDest; }; 
		/**
		 * \fn CDAORechercheLier(void)
		 * \brief Constructeur
		 */
		CDAORechercheLier(void) : CDAO() {
			addKey("id");
			addField("id");
			addField("tableSource");
			addField("champSource");
			addField("tableDest");
			addField("champDest");
		}
		virtual void set(QString fieldName, QVariant value) {
			if(fieldName == "id") {
				setFieldId(value);
			}
			if(fieldName == "tableSource") {
				setFieldTableSource(value);
			}
			if(fieldName == "champSource") {
				setFieldChampSource(value);
			}
			if(fieldName == "tableDest") {
				setFieldTableDest(value);
			}
			if(fieldName == "champDest") {
				setFieldChampDest(value);
			}
		}
		virtual QVariant get(QString fieldName) {
			if(fieldName == "id") {
				return getFieldId();
			}
			if(fieldName == "tableSource") {
				return getFieldTableSource();
			}
			if(fieldName == "champSource") {
				return getFieldChampSource();
			}
			if(fieldName == "tableDest") {
				return getFieldTableDest();
			}
			if(fieldName == "champDest") {
				return getFieldChampDest();
			}
			return QVariant();
		}
};
//------------------------------------------------------------------------------
#endif //__CDAORECHERCHELIER_H__
//------------------------------------------------------------------------------
